/**
 * Entity基类
 * 
 * @author JN
 */
export class BaseEntity {

    /** 搜索值 */
    searchValue: string;

    /** 创建者 */
    createBy: string;

    /** 创建时间 */
    createTime: Date;

    /** 更新者 */
    updateBy: string;

    /** 更新时间 */
    updateTime: Date;

    /** 删除者 */
    deleteBy: string;

    /** 更新时间 */
    deleteTime: Date;

    /** 备注 */
    remark: string;

    /** 参数 */
    params: any;

    pageNum: number;

    pageSize: number;

    /** 是否删除 */
    private delFlag: string;

    constructor(base: BaseEntity) {
        this.searchValue = base?.searchValue;
        this.createBy = base?.createBy;
        this.createTime = base?.createTime;
        this.updateBy = base?.updateBy;
        this.updateTime = base?.updateTime;
        this.deleteBy = base?.deleteBy;
        this.deleteTime = base?.deleteTime;
        this.remark = base?.remark;
        this.params = base?.params;
        this.pageSize = base?.pageSize;
        this.pageNum = base?.pageNum;
        this.delFlag = base?.delFlag;
    }

    getSearchValue() {
        return this.searchValue;
    }

    setSearchValue(searchValue: string) {
        this.searchValue = searchValue;
    }

    getCreateBy() {
        return this.createBy;
    }

    setCreateBy(createBy: string) {
        this.createBy = createBy;
    }

    getCreateTime() {
        return this.createTime;
    }

    setCreateTime(createTime: Date) {
        this.createTime = createTime;
    }

    getUpdateBy() {
        return this.updateBy;
    }

    setUpdateBy(updateBy: string) {
        this.updateBy = updateBy;
    }

    getUpdateTime() {
        return this.updateTime;
    }

    setUpdateTime(updateTime: Date) {
        this.updateTime = updateTime;
    }

    getDeleteBy() {
        return this.deleteBy;
    }

    setDeleteBy(deleteBy: string) {
        this.deleteBy = deleteBy;
    }

    getDeleteTime() {
        return this.deleteTime;
    }

    setDeleteTime(deleteTime: Date) {
        this.deleteTime = deleteTime;
    }

    getRemark() {
        return this.remark;
    }

    setRemark(remark: string) {
        this.remark = remark;
    }

    getParams() {
        if (this.params == null) {
            this.params = Object;
        }
        return this.params;
    }

    setParams(params: any) {
        this.params = params;
    }

    getPageNum() {
        return this.pageNum;
    }

    setPageNum(pageNum: any) {
        this.pageNum = pageNum;
    }

    getPageSize() {
        return this.pageSize;
    }

    setPageSize(pageSize: any) {
        this.pageSize = pageSize;
    }

    getDelFlag() {
        return this.delFlag;
    }

    setDelFlag(delFlag: string) {
        this.delFlag = delFlag;
    }
}